window.onload = function()
{
    initializeDropDownMenu();

    var isBarleyBreak = document.getElementById( 'play' );
    if ( isBarleyBreak )
    {
        gameStart();
    }

    var regForm = document.getElementById( 'reg_form' );
    if ( regForm )
    {
        regForm.onsubmit = checkRegistrationData;
        
        var regFormPassword = document.getElementById( 'reg_password' );
        regFormPassword.onchange = passDifficult;
    }
    
    var ratingButtons = document.getElementsByName( 'rating_button' );
    if ( ratingButtons )
    {
        initializeRatingButtons();
    }
}